package com.example.demo.support.exception;

public interface Assert {

    BaseException newException(Object... args);

    BaseException newException(Throwable t, Object... args);

    default void assertNotNull(Object obj) throws BaseException {
        if (null == obj){
            throw newException(obj);
        }
    }

    default void assertNotNull(Object obj, Object... args) throws BaseException {
        if (null == obj){
            throw newException(args);
        }
    }
}
